package com.tmc.dao.impl.inthotel;

import org.hibernate.Query;
import org.hibernate.Session;
import org.springframework.stereotype.Repository;

import com.tmc.dao.impl.BaseDaoImpl;

@Repository
public class ToCountryContinentDaoImpl extends BaseDaoImpl {
	
	public String queryContinent(String countryName){
		Session session = getSession();
		String hql = "select cc.continentName from ToCountryContinent as cc where cc.countryName = :countryName";
		Query query = session.createQuery(hql);
		query.setString("countryName",countryName);
		String continentName =(String)query.uniqueResult();
		session.close();
		return continentName;
	}

}
